]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Subtract vertical margins from availHeight
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 16 Feb 2022 19:04:03 +0000 (20:04 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 16 Feb 2022 20:08:44 +0000 (20:08 +0000)
The vertical margins are part of this._maxHeight, so we need to subtract
it in order to propery limit icon sizes when the available height is too
small.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2191>

js/ui/dash.js

index 311117471d03abf61085f0cf6b8e64decb13759d..7c449f8515657227ebd72d4fd12c42a6c0046af1 100644 (file)
@@ -610,6 +610,7 @@ var Dash = GObject.registerClass({
                        (iconChildren.length - 1) * spacing;
 
         let availHeight = this._maxHeight;
+        availHeight -= this.margin_top + this.margin_bottom;
         availHeight -= this._background.get_theme_node().get_vertical_padding();
         availHeight -= themeNode.get_vertical_padding();
         availHeight -= buttonHeight - iconHeight;